<?php
require(dirname(__FILE__)."/includes/init.php");
if(isset($_SESSION['user_name'])){
$sql = "select * from sendLimit";
$result = $GLOBALS['db']->dbfetchAll($sql);
?>
<table width="800" border="0" bgcolor="#0066FF">
  <tr bgcolor="#FFFFFF">
    <td>Id</td>
    <td>IpList</td>
    <td>EmailName</td>
    <td>SendNum</td>
    <td>Temp</td>
    <td>Limit</td>
  </tr>
<?php 
    foreach($result as $key=>$value){
?>  
  <tr bgcolor="#FFFFFF">
    <td><?php echo $value['id'];?></td>
    <td><?php echo $value['ipType'];?></td>
    <td><?php echo $value['emailName'];?></td>
    <td><?php echo $value['emailSendNum'];?></td>
    <td><?php echo $value['tempMemory'];?></td>
    <td><?php echo $value['emailNumLimit'];?></td>
  </tr>
<?php }?>  
  <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr bgcolor="#FFFFFF">
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
<?php
}else{
 echo "hello";
}
?>